Integrand size = 21, antiderivative size = 60 \[ \int \frac {\coth (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {\log (\cosh (c+d x))}{(a+b) d}+\frac {\log (\tanh (c+d x))}{a d}-\frac {b \log \left (a+b \tanh ^2(c+d x)\right )}{2 a (a+b) d} \]
Time = 0.08 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.92 \[ \int \frac {\coth (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {\frac {\log (\cosh (c+d x))}{a+b}+\frac {\log (\tanh (c+d x))}{a}-\frac {b \log \left (a+b \tanh ^2(c+d x)\right )}{2 a (a+b)}}{d} \]
(Log[Cosh[c + d*x]]/(a + b) + Log[Tanh[c + d*x]]/a - (b*Log[a + b*Tanh[c + d*x]^2])/(2*a*(a + b)))/d
Time = 0.30 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.08, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 26, 4153, 26, 354, 93, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\coth (c+d x)}{a+b \tanh ^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {i}{\tan (i c+i d x) \left (a-b \tan (i c+i d x)^2\right )}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle i \int \frac {1}{\tan (i c+i d x) \left (a-b \tan (i c+i d x)^2\right )}dx\) |
\(\Big \downarrow \) 4153 |
\(\displaystyle \frac {i \int -\frac {i \coth (c+d x)}{\left (1-\tanh ^2(c+d x)\right ) \left (b \tanh ^2(c+d x)+a\right )}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {\int \frac {\coth (c+d x)}{\left (1-\tanh ^2(c+d x)\right ) \left (b \tanh ^2(c+d x)+a\right )}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 354 |
\(\displaystyle \frac {\int \frac {\coth (c+d x)}{\left (1-\tanh ^2(c+d x)\right ) \left (b \tanh ^2(c+d x)+a\right )}d\tanh ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 93 |
\(\displaystyle \frac {\int \left (-\frac {b^2}{a (a+b) \left (b \tanh ^2(c+d x)+a\right )}+\frac {\coth (c+d x)}{a}-\frac {1}{(a+b) \left (\tanh ^2(c+d x)-1\right )}\right )d\tanh ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {\log \left (1-\tanh ^2(c+d x)\right )}{a+b}-\frac {b \log \left (a+b \tanh ^2(c+d x)\right )}{a (a+b)}+\frac {\log \left (\tanh ^2(c+d x)\right )}{a}}{2 d}\) |
(Log[Tanh[c + d*x]^2]/a - Log[1 - Tanh[c + d*x]^2]/(a + b) - (b*Log[a + b* Tanh[c + d*x]^2])/(a*(a + b)))/(2*d)
3.2.76.3.1 Defintions of rubi rules used
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_] :> Int[ExpandIntegrand[(e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; Fre eQ[{a, b, c, d, e, f}, x] && IntegerQ[p]
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S ymbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x , x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ [(m - 1)/2]
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[c*(ff/f) Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio nalQ[n]))
Time = 0.16 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.08
method | result | size |
parallelrisch | \(\frac {-b \ln \left (a +b \tanh \left (d x +c \right )^{2}\right )-2 \ln \left (1-\tanh \left (d x +c \right )\right ) a +\left (2 a +2 b \right ) \ln \left (\tanh \left (d x +c \right )\right )-2 a d x}{2 d a \left (a +b \right )}\) | \(65\) |
derivativedivides | \(-\frac {\frac {b \ln \left (a +b \tanh \left (d x +c \right )^{2}\right )}{2 a \left (a +b \right )}+\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{2 a +2 b}-\frac {\ln \left (\tanh \left (d x +c \right )\right )}{a}+\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{2 a +2 b}}{d}\) | \(81\) |
default | \(-\frac {\frac {b \ln \left (a +b \tanh \left (d x +c \right )^{2}\right )}{2 a \left (a +b \right )}+\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{2 a +2 b}-\frac {\ln \left (\tanh \left (d x +c \right )\right )}{a}+\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{2 a +2 b}}{d}\) | \(81\) |
risch | \(\frac {x}{a +b}-\frac {2 x}{a}-\frac {2 c}{d a}+\frac {2 b x}{a \left (a +b \right )}+\frac {2 b c}{d a \left (a +b \right )}+\frac {\ln \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d a}-\frac {b \ln \left ({\mathrm e}^{4 d x +4 c}+\frac {2 \left (a -b \right ) {\mathrm e}^{2 d x +2 c}}{a +b}+1\right )}{2 d a \left (a +b \right )}\) | \(117\) |
1/2*(-b*ln(a+b*tanh(d*x+c)^2)-2*ln(1-tanh(d*x+c))*a+(2*a+2*b)*ln(tanh(d*x+ c))-2*a*d*x)/d/a/(a+b)
Leaf count of result is larger than twice the leaf count of optimal. 118 vs. \(2 (58) = 116\).
Time = 0.31 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.97 \[ \int \frac {\coth (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=-\frac {2 \, a d x + b \log \left (\frac {2 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{2} + {\left (a + b\right )} \sinh \left (d x + c\right )^{2} + a - b\right )}}{\cosh \left (d x + c\right )^{2} - 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2}}\right ) - 2 \, {\left (a + b\right )} \log \left (\frac {2 \, \sinh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right )}{2 \, {\left (a^{2} + a b\right )} d} \]
-1/2*(2*a*d*x + b*log(2*((a + b)*cosh(d*x + c)^2 + (a + b)*sinh(d*x + c)^2 + a - b)/(cosh(d*x + c)^2 - 2*cosh(d*x + c)*sinh(d*x + c) + sinh(d*x + c) ^2)) - 2*(a + b)*log(2*sinh(d*x + c)/(cosh(d*x + c) - sinh(d*x + c))))/((a ^2 + a*b)*d)
\[ \int \frac {\coth (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int \frac {\coth {\left (c + d x \right )}}{a + b \tanh ^{2}{\left (c + d x \right )}}\, dx \]
Time = 0.20 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.68 \[ \int \frac {\coth (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=-\frac {b \log \left (2 \, {\left (a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + {\left (a + b\right )} e^{\left (-4 \, d x - 4 \, c\right )} + a + b\right )}{2 \, {\left (a^{2} + a b\right )} d} + \frac {d x + c}{{\left (a + b\right )} d} + \frac {\log \left (e^{\left (-d x - c\right )} + 1\right )}{a d} + \frac {\log \left (e^{\left (-d x - c\right )} - 1\right )}{a d} \]
-1/2*b*log(2*(a - b)*e^(-2*d*x - 2*c) + (a + b)*e^(-4*d*x - 4*c) + a + b)/ ((a^2 + a*b)*d) + (d*x + c)/((a + b)*d) + log(e^(-d*x - c) + 1)/(a*d) + lo g(e^(-d*x - c) - 1)/(a*d)
Time = 0.31 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.62 \[ \int \frac {\coth (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=-\frac {\frac {b \log \left (a e^{\left (4 \, d x + 4 \, c\right )} + b e^{\left (4 \, d x + 4 \, c\right )} + 2 \, a e^{\left (2 \, d x + 2 \, c\right )} - 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )}{a^{2} + a b} + \frac {2 \, {\left (d x + c\right )}}{a + b} - \frac {2 \, \log \left ({\left | e^{\left (2 \, d x + 2 \, c\right )} - 1 \right |}\right )}{a}}{2 \, d} \]
-1/2*(b*log(a*e^(4*d*x + 4*c) + b*e^(4*d*x + 4*c) + 2*a*e^(2*d*x + 2*c) - 2*b*e^(2*d*x + 2*c) + a + b)/(a^2 + a*b) + 2*(d*x + c)/(a + b) - 2*log(abs (e^(2*d*x + 2*c) - 1))/a)/d
Time = 2.09 (sec) , antiderivative size = 194, normalized size of antiderivative = 3.23 \[ \int \frac {\coth (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {\ln \left (12\,a\,b^2+4\,a^2\,b+9\,b^3-9\,b^3\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}-12\,a\,b^2\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}-4\,a^2\,b\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\right )}{a\,d}-\frac {b\,\ln \left (5\,a\,b+2\,a^2+3\,b^2+4\,a^2\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+2\,a^2\,{\mathrm {e}}^{4\,c}\,{\mathrm {e}}^{4\,d\,x}-6\,b^2\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+3\,b^2\,{\mathrm {e}}^{4\,c}\,{\mathrm {e}}^{4\,d\,x}+2\,a\,b\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+5\,a\,b\,{\mathrm {e}}^{4\,c}\,{\mathrm {e}}^{4\,d\,x}\right )}{2\,d\,a^2+2\,b\,d\,a}-\frac {x}{a+b} \]
log(12*a*b^2 + 4*a^2*b + 9*b^3 - 9*b^3*exp(2*c)*exp(2*d*x) - 12*a*b^2*exp( 2*c)*exp(2*d*x) - 4*a^2*b*exp(2*c)*exp(2*d*x))/(a*d) - (b*log(5*a*b + 2*a^ 2 + 3*b^2 + 4*a^2*exp(2*c)*exp(2*d*x) + 2*a^2*exp(4*c)*exp(4*d*x) - 6*b^2* exp(2*c)*exp(2*d*x) + 3*b^2*exp(4*c)*exp(4*d*x) + 2*a*b*exp(2*c)*exp(2*d*x ) + 5*a*b*exp(4*c)*exp(4*d*x)))/(2*a^2*d + 2*a*b*d) - x/(a + b)